# Makefile for Xconq tests.
# Copyright (C) 1993, 1994, 1995 Stanley T. Shebs.

# Xconq is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.

srcdir = .

SHELL = /bin/sh

# Host and target-dependent makefile fragments come in here.
####
# End of host and target-dependent makefile fragments

all:

syms.diff:
	$(srcdir)/symbol-diff $(srcdir) >syms.diff

src.uses:
	$(srcdir)/src-uses.sh >src.uses

lib.uses:
	$(srcdir)/lib-uses.sh >lib.uses

all.g.uses:	$(srcdir)/all.g
	sed -e 's/;.*//' $(srcdir)/all.g | tr '() ' '\012' | grep -v xxx | sort | uniq >all.g.uses

check:	check-lib check-save check-test check-ai check-run check-long

check-lib:
	echo Testing library...
	$(srcdir)/test-lib $(srcdir)

check-save:
	echo Testing save/restore...
	$(srcdir)/test-save $(srcdir)

check-test:
	echo Testing test cases...
	$(srcdir)/test-test $(srcdir)

check-ai:
	echo Testing AI...
	$(srcdir)/test-ai $(srcdir)

check-run:
	echo Testing running...
	$(srcdir)/test-run $(srcdir)

check-long:
	echo Testing long games...
	$(srcdir)/test-long $(srcdir)

check_sync: syms.diff all.g.uses src.uses lib.uses

install: all install-only

install-only:

clean:
	rm -f *.log core *.xconq

distclean: clean
	rm -f *.sym *.syms *.uses *.diff
	rm -f Makefile config.status

extraclean: distclean
	rm -f *~* .*~*

realclean: distclean

Makefile: Makefile.in $(host_makefile_frag) $(target_makefile_frag)
	$(SHELL) config.status
